﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using Friedlich.Common;

namespace ContactManager
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string rootDirectory = @"c:\users\todd\documents\visual studio 2010\Projects\Friedlich\TestConsole\";
            TextReader xmlFile = new StreamReader(string.Concat(rootDirectory, "contacts.xml"));
            XmlReader xmlReader = new XmlTextReader(xmlFile);
            XDocument xmlDoc = XDocument.Load(xmlReader);
            Friedlich.Google.FOAF foaf = new Friedlich.Google.FOAF(xmlDoc);
            ContactList contacts = foaf.Contacts;
            contactsListView.DataSource = contacts;
            contactsListView.DataBind();
        }
    }
}